//
//  BCUserInfoCell.m
//  BangcaiBuy
//
//  Created by lsy on 16/6/15.
//  Copyright © 2016年 BCB. All rights reserved.
//

#import "BCUserInfoCell.h"

@interface BCUserInfoCell()
{
    UILabel *infoNameLab;
    UITextField *info;
    UILabel *line;
}
@end

@implementation BCUserInfoCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}


- (void)createView
{
    infoNameLab = [[UILabel alloc] init];

    info = [[UITextField alloc] init];
    line = [[UILabel alloc] init];
    line.backgroundColor = [UIColor colorWithRed:0.851  green:0.851  blue:0.851 alpha:1];
    [self.contentView addSubview:infoNameLab];
    [self.contentView addSubview:info];
    [self.contentView addSubview:line];
    
}

- (void)layoutSubviews{
    infoNameLab.text = self.infoName;
    info.placeholder = self.placeholder;
    infoNameLab.font = [UIFont boldSystemFontOfSize:18];
    infoNameLab.textColor = [UIColor colorWithRed:0.350  green:0.556  blue:0.403 alpha:1];
    [infoNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(self.contentView);
        make.width.mas_equalTo(150);
        make.top.equalTo(self.contentView);
        make.left.mas_equalTo(10);
    }];
    [info mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.and.top.equalTo(self.contentView);
        make.left.mas_equalTo(infoNameLab.mas_right);
    }];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(1);
        make.width.and.bottom.equalTo(self.contentView);
    }];
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
